<?php

namespace App\Http\Requests\Api\Apply;

use App\Http\Requests\Request;

class Create extends Request
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules(): array
    {
        return [
            'name' => 'required',
            'id_card_number' =>['required'],
            'phone' => ['required', 'integer'],
            'source' => 'nullable',
            'work_type' => 'nullable',
            'level' => 'nullable',
            'work_experience' => 'nullable',
            'card_front_image' => 'nullable',
            'card_back_image' => 'nullable',
            'head_image' => 'nullable',
            'diploma_image' => 'nullable',
            'social_security_image' => 'nullable',
            'skill_image' => 'nullable',
            'age'=>'nullable',
            'sex'=>'nullable',
            'company'=>'nullable'
        ];
    }

    public function messages(): array
    {
        return [
            'name.required' => '请填写 姓名',
            'id_card_number.required' => '请填写 身份证号',
            'phone.required' => '请填写 手机号',
        ];
    }
}
